
package vn.aptech.project.control;
import vn.aptech.project.model.dao.*;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLException;
import vn.aptech.project.model.dto.*;
import java.util.Vector;

public class  category_BLL {

private category_DAO   obj ;


public category_BLL() throws ClassNotFoundException, SQLException, IOException {
     this.obj   = new  category_DAO();
}
public String getCategoryNameByCategoryId(int typeid) throws SQLException, FileNotFoundException, IOException{
    return obj.getCategoryNameByCategoryId(typeid);
}

public Vector selectcategory() throws SQLException {
 return  obj.selectall();
}
public Vector topcategory() throws SQLException
{
return obj.topcategory();
}
public Vector selectTypeinfo() throws SQLException {
 return  obj.selectTypeinfo();
}
public int getTypeidBytypeinfo(String typeinfo) throws SQLException, FileNotFoundException, IOException {
 return  obj.getCategoryIdByCategoryName(typeinfo);
}
public int insertcategory(category_DTO object) throws SQLException {
 return  obj.insert(object);
}


public int updatecategory(category_DTO object) throws SQLException {
 return  obj.update(object);
}


public int deletecategory(int Typeid) throws SQLException {
 return  obj.delete(Typeid);
}
}
